<script setup lang="ts">
import {ref,shallowRef,triggerRef} from 'vue'
const message:string = '我是架构师';
let shallow=shallowRef({
  name:'dsy'
});
let flag = true;
const changeName = () => {
  // shallow.value.name="oyhh";
  // shallow.value={name:"oyhh"};
  flag = !flag;
  shallow.value.name=flag ?"oyhh":"dsy";
  triggerRef(shallow);
  console.log('click',shallow);
}
</script>

<template>
<div>{{message}}</div>
<input type="text" v-model="shallow.name">
<div>{{shallow.name}}</div>
<button @click="changeName">change</button>
</template>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
